package cn.com.cifi.mars.web.action.masterDataToMars;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = "数据初始化API")
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/masterToMars")
public interface IMasterDataToMarsController {

	@ApiOperation(value = "项目", notes = "主数据项目")
	@GetMapping(value = "project")
	R project(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);

	@ApiOperation(value = "项目分期", notes = "主数据项目分期")
	@GetMapping(value = "stage")
	R stage(@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);

	@ApiOperation(value = "楼栋业态面积", notes = "主数据楼栋业态面积")
	@GetMapping(value = "buildArea")
	R buildArea(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);

	@ApiOperation(value = "组团楼栋关系", notes = "主数据组团楼栋关系")
	@GetMapping(value = "groupBld")
	R groupBld(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);

	@ApiOperation(value = "项目合作方", notes = "主数据项目合作方")
	@GetMapping(value = "partner")
	R partner(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);
	
	@ApiOperation(value = "分期合作方同步视图接口", notes = "分期合作方同步视图接口")
    @PostMapping(value = "syncViewStagePartners")
    R stagePartners(
                    @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);
	
	
	@ApiOperation(value = "明源房源信息", notes = "明源房源信息")
	@GetMapping(value = "mymrooms")
	R rooms(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);
	
	@ApiOperation(value = "明源房源信息", notes = "明源房源信息(紧价格需求变更测试使用)")
	@GetMapping(value = "mymrooms2")
	R rooms2(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "环境（dev / uat）", required = true, defaultValue = "") @RequestParam(name = "type",required = true) String type);
	
	@ApiOperation(value = "楼栋计划全量拉取", notes = "楼栋计划全量拉取")
    @GetMapping(value = "allData")
    String allData(
            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);

	@ApiOperation(value = "全量拉取明源视图", notes = "全量拉取明源视图")
	@GetMapping(value = "mymContractView")
	R mymContractView(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion);
	
}